Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated code and OLMKit dependency #1880

Merged
merged 14 commits into from
Oct 15, 2024

Conversation

Velin92
Copy link
Member

@Velin92 Velin92 commented Sep 16, 2024

This is better reviewed commit by commit.
This is a massive PR about removing legacy code, might split it in multiple PRs, but this is actually the first stable state in which I was able to make everything compile and work

What is done and what is missing:

  • 
 Remove all sharedHistory code
  • 
 Remove MX_CRYPTO macros
  • 
 MXUserTrustLevel can be removed and replaced with a single isVerified boolean, given that we no longer need to distinguish local and crossSigning trust status
  • 
 NSCoding implementations from MXCrossSigningInfo and others can be removed, as they are no longer persisted on the iOS side, but rather rust side
  • 
 Remove a number of unnecessary options from MXSDKOptions, such as enableRoomSharedHistoryOnInvite or enableSymmetricBackup
  • 
 A large number of integration tests access a legacyCrypto or legacyCrossSigning property which should be removed. These tests then have to be either refactored or removed entirely
  • 
 Remove MXBackgroundCryptoStore
  • 
 Legacy MXCryptoStore and MXRealmCryptoStore need to remain in place for the purpose of data migration to rust crypto, but only a few methods are required. (NOTE: I actually removed them since we don’t want to allow migration anymore)
  • 
 Remove MXSecretShareManager, and the requestPrivateKeys in MXKeyBackup which is no longer used
  • 
 This will enable the removal of many other associated classes, such as MXLegacySasTransaction, MXMegolmEncryption, MXMegolmDecryption etc
  • Remove main ...Legacy... classes such as MXLegacyCrypto, MXLegacyCrossSigning, MXLegacyKeyVerificationManager etc

@Velin92 Velin92 marked this pull request as draft September 16, 2024 22:37
@Velin92 Velin92 marked this pull request as ready for review September 17, 2024 08:00
Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff 👏

A lot of this goes over my head but we had a chat in a call about it and I've left some summary comments. Definitely needs an approval by someone with more crypto knowledge before merging but looks decent to me.

(Its a shame so many tests are going but they're all clearly based around the legacy crypto stack).

MatrixSDK/IdentityServer/MXIdentityServerRestClient.m Outdated Show resolved Hide resolved
MatrixSDK/Crypto/Recovery/MXRecoveryService.m Outdated Show resolved Hide resolved
MatrixSDK/Crypto/Data/MXOlmInboundGroupSession.m Outdated Show resolved Hide resolved
Copy link
Contributor

@manuroe manuroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this big cleanup.
I left some questions.

MatrixSDK/Crypto/KeyBackup/MXKeyBackupPassword.m Outdated Show resolved Hide resolved
MatrixSDK/Crypto/KeyBackup/MXKeyBackupPassword.m Outdated Show resolved Hide resolved
MatrixSDK/Crypto/KeyBackup/MXRecoveryKey.m Show resolved Hide resolved
Copy link
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that some edgecases around recovery are broken now, maybe even happy path for backup?

MatrixSDK/Crypto/Recovery/MXRecoveryService.m Outdated Show resolved Hide resolved
Copy link
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Velin92 Velin92 merged commit bae7783 into develop Oct 15, 2024
3 checks passed
@Velin92 Velin92 deleted the mauroromito/libolm_removal branch October 15, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants